package com.changcheng.service.Imp;


import com.changcheng.mapper.ArticleTypeMapper;
import com.changcheng.service.ArticleTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleTypeServiceImpl implements ArticleTypeService {

    @Autowired
    ArticleTypeMapper articleTypeDao;
    @Override
    public List<String> findAllArticleType() {
        return articleTypeDao.findAllArticleType();
    }

    @Override
    public boolean findArticleType(String name) {
        String cx = articleTypeDao.findArticleType(name);
        if (cx == null){
            return false;
        }else{
            return true;
        }

    }
    //add
    @Override
    public void add(String name) {
        articleTypeDao.add(name);
    }
    //update
    @Override
    public void update(String name) {
        articleTypeDao.update(name);
    }

    //delete
    @Override
    public void delete(String name) {
        articleTypeDao.delete(name);
    }



}
